<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>容器技术演进：从隔离到编排的完整指南</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        /* 首字下沉效果 */
        .drop-cap::first-letter {
            float: left;
            font-size: 4rem;
            line-height: 3rem;
            padding-right: 0.5rem;
            margin-top: 0.5rem;
            font-weight: 700;
            color: #4f46e5;
        }
        
        /* 代码块美化 */
        pre {
            background: #1e293b;
            color: #e2e8f0;
            border-radius: 12px;
            padding: 1.5rem;
            overflow-x: auto;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            position: relative;
        }
        
        pre::before {
            content: attr(data-language);
            position: absolute;
            top: 0.5rem;
            right: 1rem;
            font-size: 0.75rem;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        /* 表格美化 */
        table {
            border-collapse: separate;
            border-spacing: 0;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
        
        /* 卡片悬停效果 */
        .card-hover {
            transition: all 0.3s ease;
        }
        
        .card-hover:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
        }
        
        /* 时间线样式 */
        .timeline-item::before {
            content: '';
            position: absolute;
            left: -1px;
            top: 2rem;
            bottom: -2rem;
            width: 2px;
            background: #e5e7eb;
        }
        
        .timeline-item:last-child::before {
            display: none;
        }
        
        /* 渐变文字 */
        .gradient-text {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        /* 动画效果 */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .animate-fadeInUp {
            animation: fadeInUp 0.6s ease-out;
        }
        
        /* Mermaid 图表样式 */
        .mermaid {
            background: white;
            border-radius: 12px;
            padding: 2rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
    </style>
</head>
<body>
    <!-- Hero 区域 -->
    <section class="relative overflow-hidden bg-gradient-to-br from-indigo-600 via-purple-600 to-pink-500 text-white">
        <div class="absolute inset-0 bg-black opacity-20"></div>
        <div class="relative max-w-7xl mx-auto px-4 py-24 sm:px-6 lg:px-8">
            <div class="text-center animate-fadeInUp">
                <h1 class="text-5xl md:text-7xl font-bold mb-6">
                    容器技术演进之路
                </h1>
                <p class="text-xl md:text-2xl mb-8 opacity-90">
                    从 chroot 到 Kubernetes，探索现代应用部署的革命性变革
                </p>
                <div class="flex justify-center space-x-6 text-sm">
                    <span class="flex items-center">
                        <i class="fas fa-clock mr-2"></i>
                        阅读时间：15分钟
                    </span>
                    <span class="flex items-center">
                        <i class="fas fa-layer-group mr-2"></i>
                        深度技术文章
                    </span>
                </div>
            </div>
        </div>
        <div class="absolute bottom-0 left-0 right-0">
            <svg viewBox="0 0 1440 120" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M0 120L60 105C120 90 240 60 360 45C480 30 600 30 720 37.5C840 45 960 60 1080 67.5C1200 75 1320 75 1380 75L1440 75V120H1380C1320 120 1200 120 1080 120C960 120 840 120 720 120C600 120 480 120 360 120C240 120 120 120 60 120H0Z" fill="white"/>
            </svg>
        </div>
    </section>

    <!-- 主要内容区 -->
    <main class="max-w-6xl mx-auto px-4 py-12 sm:px-6 lg:px-8">
        
        <!-- 技术演进时间线 -->
        <section class="mb-16">
            <div class="bg-white rounded-2xl shadow-xl p-8 card-hover">
                <h2 class="text-3xl font-bold mb-8 gradient-text">技术演进时间线</h2>
                <div class="mermaid">
                    graph LR
                        A[1979: chroot] --> B[2001: Linux VServer]
                        B --> C[2006: Process Containers]
                        C --> D[2008: LXC]
                        D --> E[2013: Docker]
                        E --> F[2014: Kubernetes]
                        F --> G[2019: Podman]
                        
                        style A fill:#f9f,stroke:#333,stroke-width:2px
                        style E fill:#bbf,stroke:#333,stroke-width:2px
                        style F fill:#bfb,stroke:#333,stroke-width:2px
                </div>
            </div>
        </section>

        <!-- 第一章：容器技术的起源 -->
        <section class="mb-16">
            <div class="bg-white rounded-2xl shadow-xl p-8 card-hover">
                <h2 class="text-3xl font-bold mb-6 flex items-center">
                    <i class="fas fa-history text-indigo-600 mr-4"></i>
                    一、容器技术的起源：从 chroot 到现代容器
                </h2>
                
                <div class="space-y-8">
                    <!-- 1.1 chroot -->
                    <div class="border-l-4 border-indigo-500 pl-6">
                        <h3 class="text-2xl font-semibold mb-4">1.1 chroot：最早的隔离实验（1979）</h3>
                        <div class="prose prose-lg">
                            <p class="drop-cap text-gray-700 leading-relaxed">
                                技术的演进往往始于简单的想法。1979年，Unix V7引入了chroot系统调用，这个看似简单的功能开启了进程隔离的新纪元。通过改变进程的根目录视图，chroot为后来的容器技术奠定了概念基础。
                            </p>
                            <div class="mt-6 bg-gray-50 rounded-lg p-4">
                                <p class="font-semibold text-indigo-600 mb-2">
                                    <i class="fas fa-code mr-2"></i>技术原理：改变进程的根目录视图
                                </p>
                                <p class="font-semibold text-indigo-600">
                                    <i class="fas fa-coffee mr-2"></i>Java应用场景：构建独立运行环境
                                </p>
                            </div>
                        </div>
                        <pre data-language="bash" class="mt-4"><code># 创建Java运行环境
mkdir -p /opt/java-env/{bin,lib64}
cp /usr/bin/java /opt/java-env/bin/
cp /usr/lib64/* /opt/java-env/lib64/
chroot /opt/java-env java -version</code></pre>
                    </div>

                    <!-- 1.2 Linux VServer -->
                    <div class="border-l-4 border-purple-500 pl-6">
                        <h3 class="text-2xl font-semibold mb-4">1.2 Linux VServer（2001）：首次进程隔离</h3>
                        <p class="text-gray-700 mb-4">通过修改内核实现：</p>
                        <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
                            <div class="bg-purple-50 rounded-lg p-4 text-center">
                                <i class="fas fa-sitemap text-3xl text-purple-600 mb-2"></i>
                                <p class="font-semibold">隔离进程树</p>
                            </div>
                            <div class="bg-purple-50 rounded-lg p-4 text-center">
                                <i class="fas fa-network-wired text-3xl text-purple-600 mb-2"></i>
                                <p class="font-semibold">独立网络栈</p>
                            </div>
                            <div class="bg-purple-50 rounded-lg p-4 text-center">
                                <i class="fas fa-tachometer-alt text-3xl text-purple-600 mb-2"></i>
                                <p class="font-semibold">资源限制</p>
                            </div>
                        </div>
                        <div class="bg-red-50 border-l-4 border-red-400 p-4 rounded">
                            <p class="font-semibold text-red-700 mb-2">
                                <i class="fas fa-exclamation-triangle mr-2"></i>历史局限：
                            </p>
                            <ul class="list-disc list-inside text-gray-700">
                                <li>依赖定制内核</li>
                                <li>缺少标准化工具链</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- 第二章：核心隔离机制 -->
        <section class="mb-16">
            <div class="bg-white rounded-2xl shadow-xl p-8 card-hover">
                <h2 class="text-3xl font-bold mb-6 flex items-center">
                    <i class="fas fa-shield-alt text-green-600 mr-4"></i>
                    二、核心隔离机制：Namespace 与 Cgroups
                </h2>
                
                <!-- 2.1 Linux Namespace -->
                <div class="mb-8">
                    <h3 class="text-2xl font-semibold mb-6">2.1 Linux Namespace 的7种隔离维度</h3>
                    <div class="overflow-hidden rounded-lg shadow-lg">
                        <table class="w-full">
                            <thead class="bg-gradient-to-r from-indigo-500 to-purple-600 text-white">
                                <tr>
                                    <th class="px-6 py-4 text-left">Namespace类型</th>
                                    <th class="px-6 py-4 text-left">隔离内容</th>
                                    <th class="px-6 py-4 text-left">对应CLONE标志</th>
                                </tr>
                            </thead>
                            <tbody class="bg-white divide-y divide-gray-200">
                                <tr class="hover:bg-gray-50 transition-colors">
                                    <td class="px-6 py-4 font-medium">PID</td>
                                    <td class="px-6 py-4">进程ID</td>
                                    <td class="px-6 py-4 font-mono text-sm">CLONE_NEWPID</td>
                                </tr>
                                <tr class="hover:bg-gray-50 transition-colors">
                                    <td class="px-6 py-4 font-medium">Network</td>
                                    <td class="px-6 py-4">网络设备/端口</td>
                                    <td class="px-6 py-4 font-mono text-sm">CLONE_NEWNET</td>
                                </tr>
                                <tr class="hover:bg-gray-50 transition-colors">
                                    <td class="px-6 py-4 font-medium">Mount</td>
                                    <td class="px-6 py-4">文件系统挂载点</td>
                                    <td class="px-6 py-4 font-mono text-sm">CLONE_NEWNS</td>
                                </tr>
                                <tr class="hover:bg-gray-50 transition-colors">
                                    <td class="px-6 py-4 font-medium">UTS</td>
                                    <td class="px-6 py-4">主机名域名</td>
                                    <td class="px-6 py-4 font-mono text-sm">CLONE_NEWUTS</td>
                                </tr>
                                <tr class="hover:bg-gray-50 transition-colors">
                                    <td class="px-6 py-4 font-medium">IPC</td>